
Chapter 10. Ghostly, Shapely Windows
Hack 10.5: BlobJFrame

From:
   Windows Programming Using Java
   Gayathri Singh and Andrew Davison

Contacts: 
  Gayathri Singh
  support@jinvoke.com 

and

  Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat Yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th

  Web Site for the book:
     http://fivedots.coe.psu.ac.th/~ad/winJava/


If you use this code, please mention our names, and include links
to the book's Web site.

Thanks,
  Gayathri and Andrew


============================
Hack 10.5: BlobJFrame/

The files and directories are: 

* BlobJFrame.java, PaintedPanel.java

* compile.bat, run.bat   
     // batch files for compiling and running (most of) the examples;
     // they utilize J/Invoke (see below)

* images/
    - blob.png


------
Compilation and Execution
=========================

> compile *.java

> run BlobJFrame  [ < translucency value 1-255 > ]
e.g.
> run BlobJFrame 128

* To move the window: drag the cursor with the left mouse button pressed.
* To iconify/close: right click to show a popup menu.


------
Modyifying the Panel's Background

* If you add new images, make sure to put them in the images/ 
  subdirectory. The parts of the image which are to be transparent
  should be painted red.

* Mofify the BACK_IM static constant at 
  the start of PaintedJPanel.java to use the new image filename.

-------
J/Invoke

A 30-day evaluation version of J/Invoke can be downloaded from
http://www.jinvoke.com/download. Unzip it and store in a directory.

The batch files in this directory (compile.bat and run.bat) assume 
that jinvoke.jar is located in d:\jinvoke\

---------
Last updated: 13th June 2008
